<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.cndatacom.eweb.common.Constant"%>
<%@ page import="com.cndatacom.eweb.model.User"%>

<% 
	int userId = 0;
	List list = new ArrayList();
	if(request.getSession().getAttribute(Constant.SSON_CANVIEW_MODULE) != null) {
		list = (List)request.getSession().getAttribute(Constant.SSON_CANVIEW_MODULE);
	}
	request.setAttribute("list",list);
	//System.out.println(list.size());
	if(request.getSession().getAttribute(Constant.SSON_USER) != null) {
		userId = ((User)request.getSession().getAttribute(Constant.SSON_USER)).getId();
	}
%>

<table width="100%" border="0" cellPadding="0" cellSpacing="1" bgcolor="#6386d6">
    <tr bgcolor="#EFF3F7" class="TableBody1">
		<td width="30%" height="37" align="center"><b>序号</b></td>
		<td width="70%" height="37" align="center"><B>模块名称</B></td>
    </tr>
    <c:if test="${!empty list}">
		<c:forEach items="${list}" var="info">
	    	<tr bgcolor="#EFF3F7" onmouseover="this.bgColor = '#DEE7FF';" onmouseout="this.bgColor='#EFF3F7';">
		    	<td align="center" vAlign="center">${info.id}</td>
				<td align="center" vAlign="center"><a href="${info.url}?userid=<%=userId%>&moduleid=${info.id}">${info.name}</a></td>
        	</tr>
        </c:forEach>
	</c:if>
	<c:if test="${empty list}">
		<tr>
			<td>
	    		没有找到相应的记录
			</td>
		</tr>
	</c:if>
</table>

<br/>